Optimal. Leaf size=328 \[ -\frac {\left (\sqrt {-b^2} (A-C)+b B\right ) \tan ^m(c+d x) \sqrt {a+b \tan (c+d x)} \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} F_1\left (\frac {1}{2};1,-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {b \tan (c+d x)}{a}+1\right )}{b d \left (a-\sqrt {-b^2}\right )}-\frac {\left (b B-\sqrt {-b^2} (A-C)\right ) \tan ^m(c+d x) \sqrt {a+b \tan (c+d x)} \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} F_1\left (\frac {1}{2};1,-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}},\frac {b \tan (c+d x)}{a}+1\right )}{b d \left (a+\sqrt {-b^2}\right )}+\frac {2 C \tan ^m(c+d x) \sqrt {a+b \tan (c+d x)} \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};\frac {b \tan (c+d x)}{a}+1\right )}{b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.56, antiderivative size = 328, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {3655, 6720, 1692, 246, 245, 430, 429} \[ -\frac {\left (\sqrt {-b^2} (A-C)+b B\right ) \tan ^m(c+d x) \sqrt {a+b \tan (c+d x)} \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} F_1\left (\frac {1}{2};1,-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {b \tan (c+d x)}{a}+1\right )}{b d \left (a-\sqrt {-b^2}\right )}-\frac {\left (b B-\sqrt {-b^2} (A-C)\right ) \tan ^m(c+d x) \sqrt {a+b \tan (c+d x)} \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} F_1\left (\frac {1}{2};1,-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}},\frac {b \tan (c+d x)}{a}+1\right )}{b d \left (a+\sqrt {-b^2}\right )}+\frac {2 C \tan ^m(c+d x) \sqrt {a+b \tan (c+d x)} \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};\frac {b \tan (c+d x)}{a}+1\right )}{b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 245
Rule 246
Rule 429
Rule 430
Rule 1692
Rule 3655
Rule 6720
Rubi steps
\begin {align*} \int \frac {\tan ^m(c+d x) \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right )}{\sqrt {a+b \tan (c+d x)}} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^m \left (A+B x+C x^2\right )}{\sqrt {a+b x} \left (1+x^2\right )} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {2 \operatorname {Subst}\left (\int \frac {\left (\frac {-a+x^2}{b}\right )^m \left (A b^2+\left (a-x^2\right ) \left (-b B+C \left (a-x^2\right )\right )\right )}{a^2+b^2-2 a x^2+x^4} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {\left (2 \tan ^m(c+d x) (b \tan (c+d x))^{-m}\right ) \operatorname {Subst}\left (\int \frac {\left (-a+x^2\right )^m \left (A b^2+\left (a-x^2\right ) \left (-b B+C \left (a-x^2\right )\right )\right )}{a^2+b^2-2 a x^2+x^4} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {\left (2 \tan ^m(c+d x) (b \tan (c+d x))^{-m}\right ) \operatorname {Subst}\left (\int \left (C \left (-a+x^2\right )^m+\frac {\left (-a+x^2\right )^m \left (b (A b-a B-b C)+b B x^2\right )}{a^2+b^2-2 a x^2+x^4}\right ) \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {\left (2 \tan ^m(c+d x) (b \tan (c+d x))^{-m}\right ) \operatorname {Subst}\left (\int \frac {\left (-a+x^2\right )^m \left (b (A b-a B-b C)+b B x^2\right )}{a^2+b^2-2 a x^2+x^4} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}+\frac {\left (2 C \tan ^m(c+d x) (b \tan (c+d x))^{-m}\right ) \operatorname {Subst}\left (\int \left (-a+x^2\right )^m \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {\left (2 \tan ^m(c+d x) (b \tan (c+d x))^{-m}\right ) \operatorname {Subst}\left (\int \left (\frac {\left (b B-\sqrt {-b^2} (A-C)\right ) \left (-a+x^2\right )^m}{-2 a-2 \sqrt {-b^2}+2 x^2}+\frac {\left (b B+\sqrt {-b^2} (A-C)\right ) \left (-a+x^2\right )^m}{-2 a+2 \sqrt {-b^2}+2 x^2}\right ) \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}+\frac {\left (2 C \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m}\right ) \operatorname {Subst}\left (\int \left (1-\frac {x^2}{a}\right )^m \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {2 C \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a}\right ) \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} \sqrt {a+b \tan (c+d x)}}{b d}+\frac {\left (2 \left (b B-\sqrt {-b^2} (A-C)\right ) \tan ^m(c+d x) (b \tan (c+d x))^{-m}\right ) \operatorname {Subst}\left (\int \frac {\left (-a+x^2\right )^m}{-2 a-2 \sqrt {-b^2}+2 x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}+\frac {\left (2 \left (b B+\sqrt {-b^2} (A-C)\right ) \tan ^m(c+d x) (b \tan (c+d x))^{-m}\right ) \operatorname {Subst}\left (\int \frac {\left (-a+x^2\right )^m}{-2 a+2 \sqrt {-b^2}+2 x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=\frac {2 C \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a}\right ) \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} \sqrt {a+b \tan (c+d x)}}{b d}+\frac {\left (2 \left (b B-\sqrt {-b^2} (A-C)\right ) \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m}\right ) \operatorname {Subst}\left (\int \frac {\left (1-\frac {x^2}{a}\right )^m}{-2 a-2 \sqrt {-b^2}+2 x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}+\frac {\left (2 \left (b B+\sqrt {-b^2} (A-C)\right ) \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m}\right ) \operatorname {Subst}\left (\int \frac {\left (1-\frac {x^2}{a}\right )^m}{-2 a+2 \sqrt {-b^2}+2 x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=-\frac {\left (b B+\sqrt {-b^2} (A-C)\right ) F_1\left (\frac {1}{2};1,-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a-\sqrt {-b^2}},\frac {a+b \tan (c+d x)}{a}\right ) \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} \sqrt {a+b \tan (c+d x)}}{b \left (a-\sqrt {-b^2}\right ) d}-\frac {\left (b B-\sqrt {-b^2} (A-C)\right ) F_1\left (\frac {1}{2};1,-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a+\sqrt {-b^2}},\frac {a+b \tan (c+d x)}{a}\right ) \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} \sqrt {a+b \tan (c+d x)}}{b \left (a+\sqrt {-b^2}\right ) d}+\frac {2 C \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};\frac {a+b \tan (c+d x)}{a}\right ) \tan ^m(c+d x) \left (-\frac {b \tan (c+d x)}{a}\right )^{-m} \sqrt {a+b \tan (c+d x)}}{b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 28.56, size = 0, normalized size = 0.00 \[ \int \frac {\tan ^m(c+d x) \left (A+B \tan (c+d x)+C \tan ^2(c+d x)\right )}{\sqrt {a+b \tan (c+d x)}} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.82, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (C \tan \left (d x + c\right )^{2} + B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{\sqrt {b \tan \left (d x + c\right ) + a}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 2.04, size = 0, normalized size = 0.00 \[ \int \frac {\left (\tan ^{m}\left (d x +c \right )\right ) \left (A +B \tan \left (d x +c \right )+C \left (\tan ^{2}\left (d x +c \right )\right )\right )}{\sqrt {a +b \tan \left (d x +c \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \tan \left (d x + c\right )^{2} + B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{\sqrt {b \tan \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\mathrm {tan}\left (c+d\,x\right )}^m\,\left (C\,{\mathrm {tan}\left (c+d\,x\right )}^2+B\,\mathrm {tan}\left (c+d\,x\right )+A\right )}{\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \tan {\left (c + d x \right )} + C \tan ^{2}{\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}}{\sqrt {a + b \tan {\left (c + d x \right )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________